package com.sitech.ibnms.util.charts.dao;

import java.sql.SQLException;
import java.util.List;

import com.sitech.dao.BaseDao;
import com.sitech.ibnms.util.charts.domain.CURR_DATA_DOMAIN;
import com.sitech.ibnms.util.charts.domain.HIS_DATA_DOMAIN;
import com.sitech.ibnms.util.charts.domain.ViewQuery;

/**
 * @author Mirror_Jean
 * 
 * @Date :Jan 4, 2011
 * @Time :5:42:11 PM
 * @Vesion :DBViewDao
 */
public class ChartViewDao extends BaseDao {

	//使用
	public List<HIS_DATA_DOMAIN> getHisData(ViewQuery viewQuery) {
		List<HIS_DATA_DOMAIN> result = null;
		try {
			result = this.query("queryHisData", viewQuery);
			return result;
		} catch (Exception e) {
			System.out.println("这是新添加的采集实体，暂无历史表，无数据显示，消息显示:com.sitech.ismp.util.charts.dao.ChartViewDao.getHisData");
		}
		return null;
	}

	public List<CURR_DATA_DOMAIN> getCurrentData(ViewQuery viewQuery){
		List<CURR_DATA_DOMAIN> result = null ;
		viewQuery.setCONDITION("WHERE rownum<21");
		try {
			result = this.query("queryCurrentData",viewQuery);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
		
	}
}
